from flask import Blueprint,current_app

from App.models import db

first = Blueprint('first', __name__)


@first.route('/')
def hello_world():
    print(current_app.url_map)
    return 'Hello first Blueprint'


@first.route('/createdb')
def createdb():
    """创建model中定义的表"""
    db.create_all()
    return '表创建成功'
